from threading import Thread


def task(n: int):
    for i in range(n):
        print(i)


thread1 = Thread(target=task, args=(10,))
thread2 = Thread(target=task, args=(10,))

thread1.start()
thread2.start()

# 等待子线程完成
thread1.join()
thread2.join()

print("main is end")

